/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package dao.questionnaire;

import dao.DaoAbstract;
import entities.questionnaire.Apparence;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

/**
 *
 * @author aurelien.emery
 */
@Stateless
public class DaoApparence extends DaoAbstract<Apparence> implements DaoApparenceLocal {
    @PersistenceContext(unitName = "EJBProjetEFPPU")
    private EntityManager em;

    protected EntityManager getEntityManager() {
        return em;
    }

    public DaoApparence() {
        super(Apparence.class);
    }

    @Override
    public List<Apparence> findAll() {
        Query q = em.createNamedQuery("Apparence.findAllApparence");
        return q.getResultList();
    }

}
